<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*   #span1{
               background-color: red;
           }
          .mycls{
              background-color: aqua;
          }
          [id=span3]{
              background-color: black;
          }*/
        /* span{
             background-color: blue;
         }*/

    </style>
    <script>
        window.onload=function () {
            console.log(document.querySelector('#span3'));
            console.log(document.querySelectorAll('span'));
        }
    </script>
</head>
<body>
<span id="span1">1</span>
<span id="span2" class="mycls">2</span>
<span id="span3">3</span>
</body>
</html>